import { http } from "@/utils/http";
import { baseUrlApi, filerEmptyVal } from "../utils";

/** 列表查询 */
export const getOtherAwardList = (params?: object) => {
  return http.request<any>("get", baseUrlApi("/other/obtain/reward/page"), {
    params: filerEmptyVal(params)
  });
};

/** 详情 */
export const getOtherAwardDetail = (params?: object) => {
  return http.request<any>("get", baseUrlApi("/other/obtain/reward/detail"), {
    params: filerEmptyVal(params)
  });
};

/** 新增 */
export const addOtherAward = (data?: object) => {
  return http.request<any>("post", baseUrlApi("/other/obtain/reward/add"), {
    data: filerEmptyVal(data)
  });
};

/** 审核 */
export const checkOtherAward = (data?: object) => {
  return http.request<any>(
    "post",
    baseUrlApi("/other/obtain/reward/examineStatus"),
    {
      data: filerEmptyVal(data)
    }
  );
};

/** 修改 */
export const upOtherAward = (data?: object) => {
  return http.request<any>("post", baseUrlApi("/other/obtain/reward/update"), {
    data
  });
};

/** 删除 */
export const delOtherAward = (dataId?: number) => {
  return http.request<any>(
    "post",
    baseUrlApi("/other/obtain/reward/delete?id=" + dataId)
  );
};
